#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include "stdafx.h"
#include <QMainWindow>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void setWindowBusy();
    void clearWindowBusy();
    void processingList(QStringList &list, const QString &output);
    void processOver();

    void on_jcMLXZ_clicked();

    void on_plCL_clicked();

    void on_pbJC_clicked();

    void on_detectedNewFile(const QString &path);

private:
    Ui::MainWindow *ui;
    QFileSystemWatcher *m_fileSystemWatcher = nullptr;

    QMap<QString, QStringList> m_currentContentsMap; // 当前每个监控的内容目录列表

    QStringList *plFileList = nullptr;
    QFutureWatcher<void> *plCreatListWatcher = nullptr;
    QFutureWatcher<void> *plProcessingListWatcher = nullptr;
};

#endif // MAINWINDOW_H
